﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CivLib.CivHyd
{
  /// <summary>
  /// Abstract base class for One Dimensional Routing Objects
  /// </summary>
  public abstract class OneDRoutingObj : HydObj
  {
    /// <summary>
    /// Calculates the Hydraulic Radius R
    /// </summary>
    /// <returns>Hydraulic Radius</returns>
    public abstract double HydraulicRadius();
  }

  /// <summary>
  /// Interface for computing hydraulic radiuses by getting the area and perimter
  /// from a given height from the base
  /// </summary>
  public interface IHydraulicXsec
  {
    /// <summary>
    /// Flowing full area
    /// </summary>
    /// <returns>area of XSec flowing full</returns>
    double Area();

    /// <summary>
    /// The full perimeter
    /// </summary>
    /// <returns>perimeter of Xsec flowing full</returns>
    double Perimeter();

    /// <summary>
    /// The Partial Area
    /// </summary>
    /// <param name="heightFromBase">Height from base of object</param>
    /// <returns>area of Xsec in given depth</returns>
    double PartialArea(double heightFromBase);

    /// <summary>
    /// The Partial Perimeter
    /// </summary>
    /// <param name="heightFromBase">Height from base of object</param>
    /// <returns>permiter of Xsec in given depth</returns>
    double PartialPerimiter(double heightFromBase);

    /// <summary>
    /// Function to get width at a given height
    /// </summary>
    /// <param name="heightFromBase">Height from base of object</param>
    /// <returns>Width of Xsec at given depth</returns>
    double TopWidth(double heightFromBase);
  }


}
